﻿@namespace Masa.Blazor
@inherits MasaComponentBase

<div class="@GetClass()"
     style="@GetStyle()"
     id="@Id"
     @ref="@Ref"
     @attributes="@Attributes">
    <div class="swiper-wrapper">
        <CascadingValue Value="this" IsFixed>
            @ChildContent
        </CascadingValue>
    </div>

    @if (_pagination is not null)
    {
        <div class="@_paginationBlock.AppendClasses("swiper-pagination", _pagination?.Class)" 
             style="@_pagination?.Style"></div>
    }

    @if (_navigation is not null)
    {
        <div class="@_nextBlock.AppendClasses("swiper-button-next", _navigation?.Class)"
             style="@_navigation?.Style">
        </div>
        <div class="@_prevBlock.AppendClasses("swiper-button-prev", _navigation?.Class)"
             style="@_navigation?.Style">
        </div>
    }
</div>
